'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url admin/pages/kh/yhsj/chudian/fnpath 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		console.log("SPACEINFO=", originalParam.context.SPACEINFO);

		let spaceinfo = originalParam.context.SPACEINFO;
		if (spaceinfo.provider == "aliyun") {
			res.cloudfunction_path = "https://fc-mp-" + spaceinfo.spaceId + ".next.bspapp.com/hd";
			console.log("path=", res.cloudfunction_path);
		}
		
		if (spaceinfo.provider == "tencent") {
			res.cloudfunction_path = "https://" + spaceinfo.spaceId + ".service.tcloudbase.com/hd";
			console.log("path=", res.cloudfunction_path);
		}


		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
